golang/xenlight: define Defbool builtin type
authorNick Rosbrook <rosbrookn@ainfosec.com>
Mon, 16 Dec 2019 18:07:59 +0000 (18:07 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 16 Dec 2019 18:07:59 +0000 (18:07 +0000)
commit53d6570308ea5865c95f852343de05dea6c7569c
treee2dcd99444073c57c739ed2afd1ff9fafa17839c
parent871e51d2d4378dfe57ebdf5f67196b62484f6743
golang/xenlight: define Defbool builtin type

Define Defbool as struct analagous to the C type, and define the type
'defboolVal' that represent true, false, and default defbool values.

Implement Set, Unset, SetIfDefault, IsDefault, Val, and String functions
on Defbool so that the type can be used in Go analagously to how its
used in C.

Finally, implement fromC and toC functions.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/xenlight.go